﻿<Page x:Class="SnowmanConsulting.ProductKeyManager.Pages.ProductsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ProductsPage">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Resources/ProductsPageResources.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Page.Resources>
    <DockPanel>
        <Border Style="{StaticResource VistaStyleToolBarBorder}" DockPanel.Dock="Top">
            <ToolBar Style="{StaticResource VistaStyleToolBar}">
                <Button Style="{StaticResource VistaStyleToolBarButton}" ToolTip="Add Product">
                    <DockPanel>
                        <TextBlock DockPanel.Dock="Right" Style="{StaticResource VistaStyleToolBarButtonText}" Text="Add"/>
                        <Image Style="{StaticResource NewToolbarIcon}"/>
                    </DockPanel>
                </Button>
                <Button Style="{StaticResource VistaStyleToolBarButton}" Name="DeleteButton" Visibility="Collapsed" ToolTip="Delete Selected Product(s)">
                    <DockPanel>
                        <TextBlock DockPanel.Dock="Right" Style="{StaticResource VistaStyleToolBarButtonText}" Text="Remove"/>
                        <Image Style="{StaticResource DeleteToolbarIcon}"/>
                    </DockPanel>
                </Button>
                <Separator Style="{StaticResource VistaStyleToolBarSeparator}"/>
                <Button Style="{StaticResource VistaStyleToolBarButton}" ToolTip="Import">
                    <DockPanel>
                        <TextBlock DockPanel.Dock="Right" Style="{StaticResource VistaStyleToolBarButtonText}" Text="Import"/>
                        <Image Style="{StaticResource ImportToolbarIcon}"/>
                    </DockPanel>
                </Button>
                <Button Style="{StaticResource VistaStyleToolBarButton}" ToolTip="Export">
                    <DockPanel>
                        <TextBlock DockPanel.Dock="Right" Style="{StaticResource VistaStyleToolBarButtonText}" Text="Export"/>
                        <Image Style="{StaticResource ExportToolbarIcon}"/>
                    </DockPanel>
                </Button>
                <Separator Style="{StaticResource VistaStyleToolBarSeparator}"/>
                <Button Style="{StaticResource VistaStyleToolBarButton}" ToolTip="Settings" Name="SettingsButton" Click="SettingsButton_Click">
                    <DockPanel>
                        <TextBlock DockPanel.Dock="Right" Style="{StaticResource VistaStyleToolBarButtonText}" Text="Settings"/>
                        <Image Style="{StaticResource SettingsToolbarIcon}"/>
                    </DockPanel>
                </Button>
                <Button Style="{StaticResource VistaStyleToolBarButton}" ToolTip="Help">
                    <DockPanel>
                        <TextBlock DockPanel.Dock="Right" Style="{StaticResource VistaStyleToolBarButtonText}" Text="Help"/>
                        <Image Style="{StaticResource HelpToolbarIcon}"/>
                    </DockPanel>
                </Button>
            </ToolBar>
        </Border>
        <Grid DockPanel.Dock="Top" Background="Gainsboro">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button Name="NameSortButton" BorderThickness="0" Background="Transparent" Grid.Column="0">
                <DockPanel>
                    <Image DockPanel.Dock="Left"/>
                    <TextBlock Text="Name"/>
                </DockPanel>
            </Button>
            <Button Name="KeyCountSortButton" BorderThickness="0" Background="Transparent" Grid.Column="1">Key Count</Button>
        </Grid>
        <ListBox Name="ProductsListBox" ItemsSource="{Binding}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel IsItemsHost="True" />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
        </ListBox>
    </DockPanel>
</Page>
